package com.zhao;

import com.zhao.concreteColleague.*;
import com.zhao.concreteMediator.HomeMediator;

public class Client {
    public static void main(String[] args) {
        HomeMediator homeMediator = new HomeMediator();

        Owner01 owner01 = new Owner01(homeMediator);
        Owner02 owner02 = new Owner02(homeMediator);
        Owner03 owner03 = new Owner03(homeMediator);

        Tenant01 tenant01 = new Tenant01(homeMediator);
        Tenant02 tenant02 = new Tenant02(homeMediator);

        homeMediator.add(owner01, "房东");
        homeMediator.add(owner02, "房东");
        homeMediator.add(owner03, "房东");
        homeMediator.add(tenant01, "租房者");
        homeMediator.add(tenant02, "租房者");

        tenant02.contact();

        owner03.contact();
    }
}
